package com.iris.live.services.data.specifications;

import com.iris.live.services.data.models.报价保险表Model;
import org.springframework.data.jpa.domain.Specification;

import java.util.Date;

/**
 * Created by Xin on 7/8/2016.
 */
public class InsuranceSpecifications {

    public static Specification<报价保险表Model> isUpdatedAfter(Date startTime) {

        return (root, query, builder) -> builder.or(
                builder.isNull(root.<Date>get("更新时间")),
                builder.greaterThan(root.<Date>get("更新时间"), startTime)
        );
    }
}
